package com.tvserials.notification.utils;

import com.tvserials.notification.R;
import com.tvserials.notification.vo.SourceType;

import java.io.IOException;

/**
 * Created by oleksandr.dokienko on 4/22/2014.
 */
public class ResourceUtils {
    private static byte[] loadImage(String imageLink) {
        try {
            return NetworkUtils.loadContent(imageLink);
        } catch (IOException e) {
            e.printStackTrace();
        }
        return null;
    }

    public static int getIconResourceId(SourceType type) {
        switch (type) {
            case LOST_FILM:
                return R.drawable.lostfilm_icon;
            case NEW_STUDIO:
                return R.drawable.newstudio_icon;
            case SEASON_VAR:
                return R.drawable.season_var_icon;
            case ALL:
                return R.drawable.app_icon;
        }
        return R.drawable.app_icon;
    }

}
